
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0


""" Testy: a simple Freebase application running on Google's App Engine.

Taught or Not tests knowledge of the genealogy of influence. 

Shot or Not tests knowledge of historical causes of death. 

"""


# Import WSGI handlers.
from handler import *
from unittests import *

# Log a message each time this module get loaded.
logging.info('Loading %s', __name__)

    
    
   
def main():
  logging.getLogger().setLevel(logging.DEBUG)
  
  application = webapp.WSGIApplication(
                                       [
                                        ('/',
                                         Main),
                                        ('/taught/?',
                                         InfluenceQuiz),                                    
                                        ('/taught/quiz/?',
                                         InfluenceQuiz),
                                        ('/taught/grade/?',
                                         InfluenceTurnIn),            
                                        ('/taught/score/?',
                                         InfluenceViewScore),
                                        ('/shot/?',
                                         DeathQuiz),
                                        ('/shot/quiz/?',
                                         DeathQuiz),
                                        ('/shot/grade/?',
                                         DeathTurnIn),
                                        ('/shot/score/?',
                                         DeathViewScore),
                                        ('/test/?',
                                          UnitTests)                                        
                                        ],
                                       debug=True)
  wsgiref.handlers.CGIHandler().run(application)

if __name__ == "__main__":
  main()
